import { createStore } from 'vuex';
const modulesGlob = import.meta.globEager('./**/*.ts'), modules: any = {};
let getters: any = "";

Object.keys(modulesGlob).map((key) => {
  if (key.indexOf("modules") != -1) {
    let keyPath = key.split("/")[key.split("/").length - 1].replace(/\.ts|.js/, "");
    modules[keyPath] = modulesGlob[key].default;
  }
  if (key.indexOf("getters") != -1) {
    getters = modulesGlob[key].default;
  }

});
export default createStore({
  modules,
  getters
});
